package com.starry.Spring5Demo;

public class Employee {
    private String empNo;
    private String empName;
    private Department dept;

    public void setEmpNo(String empNo) {
        this.empNo = empNo;
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }

    public Department getDept() {
        return dept;
    }

    public void setDept(Department dept) {
        this.dept = dept;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "empNo='" + empNo + '\'' +
                ", empName='" + empName + '\'' +
                ", dept=" + dept +
                '}';
    }

    public void TestEmp(){
        System.out.println("打印EMP:"+this.toString());
    }
}
